
		{template 'common/header'} 
		<div class="panel panel-info">
	<div class="panel-heading" style="text-align: center;">活动内容</div>
	<div class="panel-body">
		 <form  class="form-horizontal" id="form1" name="form1" method="post" action="<?php echo $this->createWebUrl('editactivity');?>" enctype="multipart/form-data">
		 	{loop $result $index $item}
		 	<input type="hidden" class="form-control" id="id" name="id" value="{$id}" >
		 <div class="form-group">
		    <label for="inputEmail3" class="col-sm-4 control-label">活动名称:</label>
		    <div class="col-sm-4">
		    <input type="text" class="form-control" id="activityname" name="activityname" placeholder="活动名称" value="{$item['activityname']}">
		    </div> 
		    <label for="inputEmail3" class="col-sm-1 control-label" style="color:orange;text-align: left;">&nbsp;*必填</label>
		  </div> 
		  <div class="form-group">
		    <label for="inputEmail3" class="col-sm-4 control-label">活动图片:</label>
		    <div class="col-sm-4">
	          {php $pic=$item['picture']; echo tpl_form_field_image('picture',$value="$pic");}
		    </div> 
		    <label for="inputEmail3" class="col-sm-1 control-label" style="color:orange;text-align: left;">&nbsp;*必填</label>
		  </div> 
		  <div class="form-group">
		    <label for="inputEmail3" class="col-sm-4 control-label">活动时间:</label>
		    <div class="col-sm-4">
		   <input type="datetime" class="form-control" id="starttime"  name="starttime" value="{$item['starttime']}"/>到<input type="datetime" class="form-control" id="endtime" name="endtime" value="{$item['endtime']}"/>
		  </div>  
		   </div> 
		  <div class="form-group">
		    <label for="inputEmail3" class="col-sm-4 control-label">兑奖时间:</label>
		    <div class="col-sm-4">
		   <input type="datetime" class="form-control" id="tstarttime" name="tstarttime" value="{$item['tstarttime']}"/>到<input type="datetime" class="form-control" id="tendtime" name="tendtime" value="{$item['tendtime']}" />
		    </div> 
		  </div> 
		  <div class="form-group">
		    <label for="inputEmail3" class="col-sm-4 control-label">活动说明:</label>
		    <div class="col-sm-4">
		    <textarea class="form-control" name="activity_desc" id="activity_desc">{$item['activity_desc']}</textarea>
		    </div> 
		  </div>
		  <div class="form-group">
		    <label for="inputEmail3" class="col-sm-4 control-label">版权:</label>
		    <div class="col-sm-4">
		    <textarea class="form-control" name="power" id="power">{$item['power']}</textarea>
		    </div> 
		  </div>
		  <!-- <div class="form-group" style="text-align: center;"class="col-sm-4 control-label">
		    <div class="col-sm-4">
		    <input type="submit" class="form-control" style="text-align: center;"  value="提交"/>
		    </div> 
		  </div> -->
		  <div class="form-group col-xs-12 col-md-12 " style="text-align:center;" >
		    <input type="button"  class="form-control" style="width:
		   100px;margin:0 auto; color: blue;"  value="提交" onclick="sub()" />
		  </div>
		  	{/loop}
		  </form>
	</div>
	</div>
</div>    
<script type="text/javascript">
function sub(){
 if($("#activityname").val()==''){
 alert("活动名称不能为空");
 return false;
 }
 if($("#starttime").val()==''){
 alert("活动开始时间不能为空");
 return false;
 }
 if($("#endtime").val()==''){
 alert("活动结束时间不能为空");
 return false;
 }
 if($("#tstarttime").val()==''){
 alert("兑奖开始时间不能为空");
 return false;
 }
 if($("#tendtime").val()==''){
 alert("兑奖结束时间不能为空");
 return false;
 }
 $("#form1").submit();
}
</script>     
	{template 'common/footer'}
